package com.yonyou.cyxdms.basedata.service.controller.basedata;

import com.yonyou.cyx.framework.controller.base.BaseController;
import com.yonyou.cyxdms.basedata.service.service.basedata.DictService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * 店端前端查询字典
 */
@Api(value = "字典Controller", tags = {"字典Controller"})
@RestController
@RequestMapping("/dlrDicts")
public class DictController extends BaseController {

    // 定义日志接口
    private static final Logger logger = LoggerFactory.getLogger(DictController.class);

    @Autowired
    private DictService dictService;

    /**
     * @author ：quankk
     * @date ：2019/7/9 18:00
     * @description：字典
     */
    @RequestMapping(method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
    @ApiOperation(value = "字典 PC迁移")
    @ApiImplicitParams({@ApiImplicitParam(value = "用户id", name = "userId", required = true, dataType = "string", paramType = "header")})
    public Map<String, Object> queryDicts(@RequestParam String appId) {
        return dictService.queryDicts(appId);
    }

}
